<?php

class Client_RK2 extends Client_Client {
    public function __construct() {
        parent::__construct(CLIENT_CLASS_RK2);
    }

    public function sendMeterReading($obj) {
        return $this->callMethod('saveMeteredData', $obj, 'isValidMeterReadingResult');
    }

    protected function isValidMeterReadingResult() {
        return trim($this->result->return) == 'Daily Metered Data has been updated successfully.';
    }

    public function sendLoadProfile($obj) {
        return $this->callMethod('saveLoadProfile', $obj, 'isValidLoadProfileResult');
    }

    protected function isValidLoadProfileResult() {
        return !$this->result->return;
    }

    public function sendLoadProfileShare($obj) {
        return $this->callMethod('saveLoadProfileShare', $obj, 'isValidLoadProfileShareResult');
    }

    protected function isValidLoadProfileShareResult() {
        return !$this->result->return;
    }
}
